package com.xyoto.community.service;

import com.xyoto.community.dto.CheckContentDTO;
import io.swagger.annotations.ApiModel;

import com.xyoto.community.dto.DeletePictureDTO;
import com.xyoto.community.dto.UploadPictureDTO;
import com.xyoto.community.utils.Result;
import org.springframework.web.multipart.MultipartFile;

/**
 * @author coderFu
 * @create 2021/10/18
 *
 * //**
 * 图片服务类
 */
@ApiModel("图片服务")
public interface PictureService {

    /**
     * 根据图片组key从redis取出图片id集合，并更新
     * @param key
     * @param id
     */
    void updateBathPictureKeyId(String key, Integer id);

    /**
     * 统一图片上传
     * @param uploadPictureDTO
     * @return
     */
    Result uploadPicture(UploadPictureDTO uploadPictureDTO);

    /**
     * 统一图片删除
     * @param deletePictureDTO
     * @return
     */
    Result deletePicture(DeletePictureDTO deletePictureDTO);

    /**
     * 统一文本校验接口
     * @param checkContentDTO
     * @return
     */
    Result checkContent(CheckContentDTO checkContentDTO);

    /**
     * 前端上传图片到oss
     * @param multipartFile
     * @return
     */
    Result uploadFrontIcon(MultipartFile multipartFile);

    /**
     * 检查图片合法性
     * @param uploadPictureDTO
     */
    void checkPicture(UploadPictureDTO uploadPictureDTO);
}
